﻿@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" 
Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcCms.Data.Forum>>" 

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    @ViewData["PageTitle"]

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <style type="text/css">
        label.error
        {
            float: none;
            color: red;
            padding-left: .5em;
            vertical-align: top;
        }
    </style>
    <link href="/content/app_themes/@ViewData["SkinName"] /css/Forum.css" rel="stylesheet" type="text/css" />

<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <div class="spacer_top">
        </div>
        <div id="thecontent" class="thecontent">
        <h1>@ViewData["PageTitle"]</h1>
            <div id="forums">
                foreach (var forum in ViewData.Model)
                   { 
                <div class="admin">
                    @Html.ActionLink("Edit", "EditForum", new { forumId = forum.ForumID })&nbsp;|&nbsp;@Html.ActionLink("Remove", "RemoveForum", new { forumId = forum.ForumID })</div>
                <div id="forum-@forum.ForumID " class="forum">
                    <h2>
                        @Html.ActionLink(forum.Title, "ViewForum", new { forumId = forum.ForumID, path = forum.Path }) </h2>
                    <p>
                        @forum.Moderated ? "<strong>[moderated]</strong> " : "" @forum.Description </p>
                </div>
                <hr />
                } 
            </div>
        </div>
    </div>

<asp:Content ID="SidebarContent" ContentPlaceHolderID="SidebarContent" runat="server">
    Html.RenderPartial("ControlsForum/AdminSidebar"); 

<asp:Content ID="Content4" ContentPlaceHolderID="ScriptContent" runat="server">

    <script src="/Scripts/MvcCms.js" type="text/javascript"></script>
<script type="text/javascript" >
    LoadRecentPosts();
</script>

